package cn.stylefeng.guns.modular.business.frequency.ordercarverify.mapper;

import cn.stylefeng.guns.modular.business.frequency.ordersub.model.result.PkgOrderCarVerify;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.business.frequency.ordercarverify.entity.OrderCarVerify;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 验车记录 Mapper 接口
 *
 * @author yujie
 * @date 2023/05/09 17:16
 */
public interface OrderCarVerifyMapper extends BaseMapper<OrderCarVerify> {

    PkgOrderCarVerify getPkgOrderCarVerify(@Param("id") Long id);
    List<String> selectValidateImages(@Param("id") Long id);

    List<String> getVerifyImage(@Param("type") Integer type, @Param("verifyId") Long verifyId);

    void insertVerifyImage(@Param("verifyId") String verifyId, @Param("type") int type,
            @Param("urls") List<String> urls,@Param("tenantId") Long tenantId);

    @Delete("delete from tt_order_car_verify_image where verify_id = #{verifyId}")
    void deleteVerifyImage(@Param("verifyId") Long verifyId);

    @Delete("delete from tt_order_car_verify where order_id = #{orderId}")
    void deleteByOrderId(@Param("orderId") Long orderId);

    List<PkgOrderCarVerify> getMultiPkgOrderCarVerify(@Param("orderIdList") List<Long> orderIdList);


    void removeImage(@Param("id") Long id);
}